package pl.piotrgrygiel.unittests;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class LoginPage extends Page {

	public LoginPage(WebDriver driver) {
		super(driver);
	}
		
	public HomePage login(String login, String password) {
		System.out.println("Sprawdzaj czy sie loguje");
		insertText(By.id("login"), login);
		insertText(By.id("password"), password);
		click(By.name("commit"));
		
		return new HomePage(driver);
		
	}

	public void open() {
		driver.get("http://demo.bananascrum.com/session/new");
		// TODO Auto-generated method stub
		
	}

}
